package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.ICompositeIndexLogDao;
import com.financing.platform.dto.CompositeIndexLogDTO;
import com.financing.platform.util.SqlName;
/**
 * composite_index_log  
 * 金融指数日志 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("compositeIndexLogDao")
public class CompositeIndexLogDaoImpl extends BaseDaoImpl implements ICompositeIndexLogDao {


	@Override
	public int insert(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.CompositeIndexLogSql.insert, compositeIndexLog);
	}

	@Override
	public void update(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		this.sqlMapClient.update(SqlName.CompositeIndexLogSql.update, compositeIndexLog);
	}

	@Override
	public void updateForce(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		this.sqlMapClient.update(SqlName.CompositeIndexLogSql.updateForce, compositeIndexLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.CompositeIndexLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<CompositeIndexLogDTO> queryList(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.CompositeIndexLogSql.queryList, compositeIndexLog);
	}

	@Override
	public int queryListCount(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.CompositeIndexLogSql.queryListCount, compositeIndexLog);
	}

	@Override
	public CompositeIndexLogDTO loadById(Integer id) throws SQLException {
		return  (CompositeIndexLogDTO)this.sqlMapClient.queryForObject(SqlName.CompositeIndexLogSql.loadById,id);
	}
 	
}
